#!/usr/bin/env python
from lib.format_time import *
from lib.HandleMysql import *
from lib.switch_code import *
from shop_conn import *
import sys
import re
reload(sys)
sys.setdefaultencoding('utf-8')

def get_checked_data(date):
    print "get_checked_data begin : %s"%date
    
    stat_conn = set_stats_conn()
    shop_conn = set_shop_conn()
    stat_table = "shop_check_stat"
    
    #0,uncheck 1,pass 2,reject
    query = "select identifyType,count(1) from identification where date(addTime)='%s' group by identifyType;"%date
    items = shop_conn.get_results(query)
    
    submit_count = 0
    uncheck_count = 0
    pass_count = 0
    reject_count = 0
    
    for item in items:
        shop_typ = item[0]
        cnt = item[1]
        submit_count = submit_count + cnt
            
    
    
    print "get_checked_data end : %s"%date